/*
package NiuKe;

import java.util.Scanner;

*/
/**
 * @Description:
 * @Author: Hanzao
 * @Date: 2022/06/17/10:14
 *//*

public class HJ62 {
    public static int hzh(int num){
        int res = 0;
        if(num>0){
            while(num!=0){
                if(num%2==1){
                    res++;
                }
                num = num/2;
            }
        }
        return res;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()){
            int num = scanner.nextInt();
            System.out.println(hzh(num));
        }

    }
}
*/
